package leetcode.editor.cn;

import java.util.Arrays;

/**
 * 最长连续递增序列
 * @author qulq
 * @date 2024-07-13 11:03:23
 */
public class T674_LongestContinuousIncreasingSubsequence{
	 public static void main(String[] args) {
	 	 //测试代码
	 	 Solution solution = new T674_LongestContinuousIncreasingSubsequence().new Solution();
	 }
	 
//力扣代码
//leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public int findLengthOfLCIS(int[] nums) {
		int[] dp = new int[nums.length];
		Arrays.fill(dp, 1);
		int ans = 1;
		for (int i = 1; i < nums.length; i++) {
			if (nums[i] > nums[i - 1]) {
				dp[i] = dp[i - 1] + 1;
				ans = Math.max(ans, dp[i]);
			}
		}
		return ans;
    }
}
//leetcode submit region end(Prohibit modification and deletion)

}